<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML>
<HEAD>
   <TITLE>class  SG_EXPORT osg::LOD</TITLE>
   <META NAME="GENERATOR" CONTENT="DOC++ 3.4.8">
</HEAD>
<BODY BGCOLOR="#ffffff">

<H2>class  SG_EXPORT <A HREF="#DOC.DOCU">osg::LOD</A></H2></H2><BLOCKQUOTE>LOD - Level Of Detail group node which allows switching between children depending on distance from eye point.</BLOCKQUOTE>
<HR>

<H2>Inheritance:</H2>
<APPLET CODE="ClassGraph.class" WIDTH=600 HEIGHT=125>
<param name=classes value="MNode,M,CGroup,MGroup.html,CLOD,MLOD.html,CImpostor,MImpostor.html">
<param name=before value="M,M,M,M^_">
<param name=after value="Md_SP,Md_,M,M">
<param name=indent value="0,1,2,2">
<param name=arrowdir value="down">
</APPLET>
<HR>

<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.68.1">LOD</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.68.2">LOD</A></B>(const <!1><A HREF="LOD.html#DOC.2.68.2">LOD</A>&amp;, const <!1><A HREF="CopyOp.html">CopyOp</A>&amp; copyop=CopyOp::SHALLOW_COPY)
<DD><I>Copy constructor using CopyOp to manage deep vs shallow copy</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.68.3">META_Node</A></B>(<!1><A HREF="osg.html">osg</A>, <!1><A HREF="LOD.html">LOD</A>)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual   void <B><A HREF="#DOC.2.68.4">traverse</A></B>(<!1><A HREF="NodeVisitor.html">NodeVisitor</A>&amp; nv)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.68.5">setRange</A></B>(const unsigned int index, const float range)
<DD><I>Sets the value of range list element index to range which is a floating point distance specified in world coordinates.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const float <B><A HREF="#DOC.2.68.6">getRange</A></B>(const unsigned int index) const 
<DD><I>returns the range for specified index</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const unsigned int <B><A HREF="#DOC.2.68.7">getNumRanges</A></B>() const 
<DD><I>returns the number of ranges currently set</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   void <B><A HREF="#DOC.2.68.8">setCenter</A></B>(const <!1><A HREF="Vec3.html">Vec3</A> &amp;<!1><A HREF="ConvexPlanerPolygon.html#DOC.2.32.3">center</A>)
<DD><I>Sets the object-space point which defines the center of the osg::LOD.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const <!1><A HREF="Vec3.html">Vec3</A>&amp; <B><A HREF="#DOC.2.68.9">getCenter</A></B>() const 
<DD><I>return the LOD center point.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.68.11">setEvaluateLODCallback</A></B>(<!1><A HREF="LOD.html#DOC.2.68.10">EvaluateLODCallback</A>* cbc)
<DD><I>Set the EvaluateLODCallback which allows users to attach customize computation of the the selection of LOD children</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="LOD.html#DOC.2.68.10">EvaluateLODCallback</A>* <B><A HREF="#DOC.2.68.12">getEvaluateLODCallback</A></B>()
<DD><I>Get the non const ComputeBillboardCallback</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>const <!1><A HREF="LOD.html#DOC.2.68.10">EvaluateLODCallback</A>* <B><A HREF="#DOC.2.68.13">getEvaluateLODCallback</A></B>() const 
<DD><I>Get the const ComputeBillboardCallback</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline   const int <B><A HREF="#DOC.2.68.14">evaluate</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; eye_local, const float bias=1.0f) const 
<DD><I>return the child to traverse.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual   const int <B><A HREF="#DOC.2.68.15">evaluateLODChild</A></B>(const <!1><A HREF="Vec3.html">Vec3</A>&amp; eye_local, const float bias) const 
</DL></P>

<P><DL>
<DT><H3>Public Members</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>struct  <B><A HREF="#DOC.2.68.10">EvaluateLODCallback</A></B>: public <!1><A HREF="Referenced.html">osg::Referenced</A>
<DD><I>Callback attached to an LOD which allows the users to customize the selection of LOD children</I>
</DL></P>

<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>RangeList <B><A HREF="#DOC.2.68.18">_rangeList2</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="ref_ptr.html">ref_ptr</A>&lt;<!1><A HREF="LOD.html#DOC.2.68.10">EvaluateLODCallback</A>&gt;  <B><A HREF="#DOC.2.68.19">_evaluateLODCallback</A></B>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Vec3.html">Vec3</A> <B><A HREF="#DOC.2.68.20">_center</A></B>
</DL></P>

<P><DL>
<DT><H3>Protected Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>virtual   <B><A HREF="#DOC.2.68.16">~LOD</A></B>()
</DL></P>

<P><DL>
<DT><H3>Protected Members</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>typedef  std::vector&lt;float&gt; RangeList RangeList <B><A HREF="#DOC.2.68.17">_rangeList</A></B>
</DL></P>

</DL>
<HR><H3>Inherited from <A HREF="Group.html">Group</A>:</H3>
<DL>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>virtual   bool <B>addChild</B>( Node* child )
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual   bool <B>removeChild</B>( Node* child )
<DT>
<IMG ALT="o" SRC=icon2.gif>virtual   bool <B>replaceChild</B>( Node* origChild, Node* newChild )
<DT>
<IMG ALT="o" SRC=icon2.gif>inline   const unsigned int <B>getNumChildren</B>() const 
<DT>
<IMG ALT="o" SRC=icon2.gif>inline   Node* <B>getChild</B>( const unsigned int i )
<DT>
<IMG ALT="o" SRC=icon2.gif>inline   const Node* <B>getChild</B>( const unsigned int i ) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>inline   bool <B>containsNode</B>( const Node* node ) const 
<DT>
<IMG ALT="o" SRC=icon2.gif>inline   ChildList::iterator <B>findNode</B>( const Node* node )
<DT>
<IMG ALT="o" SRC=icon2.gif>inline   ChildList::const_iterator <B>findNode</B>( const Node* node ) const 
</DL></P>

<P><DL>
<DT><H3>Protected Fields</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>ChildList <B>_children</B>
</DL></P>

<P><DL>
<DT><H3>Protected Methods</H3><DD><DT>
<IMG ALT="o" SRC=icon2.gif>virtual   const bool <B>computeBound</B>() const 
</DL></P>

</DL>

<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>LOD - Level Of Detail group node which allows switching between children
depending on distance from eye point.
Typical uses are for load balancing - objects further away from
the eye point are rendered at a lower level of detail, and at times
of high stress on the graphics pipeline lower levels of detail can
also be chosen.
The children are ordered from most detailed (for close up views) to the least 
(see from a distance), and a set of ranges are used to decide which LOD is used 
at different view distances, the criteria used is child 'i' is used when 
range[i]<dist<range[i+1] is true. This requires there to be n+1 range values where the number of
children is n, since no maximum distance of infinity is assumed.  If the number of range values (m)
is insufficient then the children m through to n will be ignored, only 0..m-1 will be used
during rendering.</BLOCKQUOTE>
<DL>

<A NAME="LOD"></A>
<A NAME="DOC.2.68.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> LOD()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="LOD"></A>
<A NAME="DOC.2.68.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> LOD(const <!1><A HREF="LOD.html#DOC.2.68.2">LOD</A>&amp;, const <!1><A HREF="CopyOp.html">CopyOp</A>&amp; copyop=CopyOp::SHALLOW_COPY)</B></TT>
<DD>Copy constructor using CopyOp to manage deep vs shallow copy
<DL><DT><DD></DL><P>
<A NAME="META_Node"></A>
<A NAME="DOC.2.68.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> META_Node(<!1><A HREF="osg.html">osg</A>, <!1><A HREF="LOD.html">LOD</A>)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="traverse"></A>
<A NAME="DOC.2.68.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual   void traverse(<!1><A HREF="NodeVisitor.html">NodeVisitor</A>&amp; nv)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="setRange"></A>
<A NAME="DOC.2.68.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setRange(const unsigned int index, const float range)</B></TT>
<DD>Sets the value of range list element index to range which
is a floating point distance specified in world coordinates.
Range list automatically expands to accommodate values beyond
the current getNumRanges().
<DL><DT><DD></DL><P>
<A NAME="getRange"></A>
<A NAME="DOC.2.68.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const float getRange(const unsigned int index) const </B></TT>
<DD>returns the range for specified index
<DL><DT><DD></DL><P>
<A NAME="getNumRanges"></A>
<A NAME="DOC.2.68.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const unsigned int getNumRanges() const </B></TT>
<DD>returns the number of ranges currently set
<DL><DT><DD></DL><P>
<A NAME="setCenter"></A>
<A NAME="DOC.2.68.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   void setCenter(const <!1><A HREF="Vec3.html">Vec3</A> &amp;<!1><A HREF="ConvexPlanerPolygon.html#DOC.2.32.3">center</A>)</B></TT>
<DD>Sets the object-space point which defines the center of the osg::LOD.  
center is affected by any transforms in the hierarchy above the osg::LOD.
<DL><DT><DD></DL><P>
<A NAME="getCenter"></A>
<A NAME="DOC.2.68.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const <!1><A HREF="Vec3.html">Vec3</A>&amp; getCenter() const </B></TT>
<DD>return the LOD center point. 
<DL><DT><DD></DL><P>
<A NAME="EvaluateLODCallback"></A>
<A NAME="DOC.2.68.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>struct  EvaluateLODCallback: public <!1><A HREF="Referenced.html">osg::Referenced</A></B></TT>
<DD>Callback attached to an LOD which allows the users to customize the selection of LOD children
<DL><DT><DD></DL><P><DL>

<A NAME="evaluateLODChild"></A>
<A NAME="DOC.2.68.10.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual   const int evaluateLODChild(const <!1><A HREF="LOD.html">osg::LOD</A>* lod, const <!1><A HREF="Vec3.html">Vec3</A>&amp; eye_local, const float bias) const  = 0</B></TT>
<DD>Compute the child to select
<DL><DT><DD></DL><P></DL>

<A NAME="setEvaluateLODCallback"></A>
<A NAME="DOC.2.68.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void setEvaluateLODCallback(<!1><A HREF="LOD.html#DOC.2.68.10">EvaluateLODCallback</A>* cbc)</B></TT>
<DD>Set the EvaluateLODCallback which allows users to attach customize computation of the the selection of LOD children
<DL><DT><DD></DL><P>
<A NAME="getEvaluateLODCallback"></A>
<A NAME="DOC.2.68.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="LOD.html#DOC.2.68.10">EvaluateLODCallback</A>* getEvaluateLODCallback()</B></TT>
<DD>Get the non const ComputeBillboardCallback
<DL><DT><DD></DL><P>
<A NAME="getEvaluateLODCallback"></A>
<A NAME="DOC.2.68.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const <!1><A HREF="LOD.html#DOC.2.68.10">EvaluateLODCallback</A>* getEvaluateLODCallback() const </B></TT>
<DD>Get the const ComputeBillboardCallback
<DL><DT><DD></DL><P>
<A NAME="evaluate"></A>
<A NAME="DOC.2.68.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline   const int evaluate(const <!1><A HREF="Vec3.html">Vec3</A>&amp; eye_local, const float bias=1.0f) const </B></TT>
<DD>return the child to traverse.
Selected by the distance between the eye point in local
coordinates and the LOD center, multiplied by the bias.
<DL><DT><DD></DL><P>
<A NAME="evaluateLODChild"></A>
<A NAME="DOC.2.68.15"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual   const int evaluateLODChild(const <!1><A HREF="Vec3.html">Vec3</A>&amp; eye_local, const float bias) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="~LOD"></A>
<A NAME="DOC.2.68.16"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>virtual   ~LOD()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_rangeList"></A>
<A NAME="DOC.2.68.17"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>typedef  std::vector&lt;float&gt; RangeList RangeList _rangeList</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_rangeList2"></A>
<A NAME="DOC.2.68.18"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>RangeList _rangeList2</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_evaluateLODCallback"></A>
<A NAME="DOC.2.68.19"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="ref_ptr.html">ref_ptr</A>&lt;<!1><A HREF="LOD.html#DOC.2.68.10">EvaluateLODCallback</A>&gt;  _evaluateLODCallback</B></TT>
<DL><DT><DD></DL><P>
<A NAME="_center"></A>
<A NAME="DOC.2.68.20"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Vec3.html">Vec3</A> _center</B></TT>
<DL><DT><DD></DL><P></DL>
<HR>
<DL><DT><B>Direct child classes:
</B><DD><A HREF="Impostor.html">Impostor</A><BR>
</DL>

<DL><DT><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>
